<link rel="stylesheet" href="<?php echo JS_PATH;?>/ndtco/sponsor_style.css" type="text/css" />


                    <div class="module">
                        <div class="moduleFrame">
                            <div class="moduleHeader">
                                <span class="moduleIcon"><img src="<?php echo JS_PATH;?>/phuongmaiadv/g/icon.gif" alt="icon"/></span>
                                <div class="moduleTitle">

<?php
$allItems = $this->allItems;
$currentPage = $this->currentPage;

if ($currentPage) {
    // check exists parent
    if ($currentPage['all_parent']) {
        $allParent = explode(',', $currentPage['all_parent']);
        if (isset($allParent[0])) {
            $allCategory = $this->allCategory;
            foreach($allParent as $parentID):
                $parent = $allCategory[$parentID];
                // check to ignore root
                if ($parent['left'] != 1) {
                ?>
                    <a href="<?php echo BASE_PATH . '/' . CURR_APP ?>?pid=<?php echo $parent['category_id']?>"><?php echo $parent['admin_title'];?></a> >> 
                <?php
                }
            endforeach;
        }
        echo $currentPage['admin_title'];
    }
}
?>

                                </div>
                            </div>
                            <div class="moduleContent">

<?php
$randomItems = $this->randomItems;
if (isset($randomItems[0])) {
?>
<div style="clear:both;"></div>
<div id="sponsors">
<div id="scroller" class="scrollable">	
	
	<!-- root element for the items -->
	<div class="items" style="left: -1320px;">
	
<?php
    foreach($randomItems as $item):
    ?>
		<?php
		$path = pathinfo($item['item_image'], PATHINFO_DIRNAME);
		$fileName = pathinfo($item['item_image'], PATHINFO_BASENAME);
		?>
        <img src="<?=ImageUtil::getImage($path,$fileName,100,100, 100,true)?>" class="border" width="100" height="100">
<?php
    endforeach;
?>
        </div>
	</div>
</div>
<div style="clear:both; height:20px;"></div>
<?php    
}
if (isset($allItems[0])) {
    foreach($allItems as $item):
    ?>
    <div style="padding: 0px 10px;text-align:left;float:left;width:300px;height:150px;overflow:hidden;">
		<?php
		$path = pathinfo($item['item_image'], PATHINFO_DIRNAME);
		$fileName = pathinfo($item['item_image'], PATHINFO_BASENAME);
		?>
		<img src="<?=ImageUtil::getImage($path,$fileName,150,150, 100,true)?>" class="border" align="left">
        <div style="margin-left:160px;">
        <a href="<?php echo BASE_PATH . '/' . CURR_APP ?>/index/index/detail?pid=<?php echo $item->category_id; ?>&id=<?php echo $item->item_id; ?>"><?php echo $item->item_title; ?></a><br>
        <?php echo $item->item_short_description; ?>
        </div>
        <div style="clear:both;"></div>
    </div>


    <?php
    endforeach;
    
    echo $this->paging;
} // if items
?>
<div style="clear:both;"></div>
                            </div>
                        </div>
                    </div>
<script language="JavaScript" type="text/javascript" src="<?php echo JS_PATH;?>/ndtco/js/jquery.js"></script>

<script type="text/javascript"
		src="http://static.flowplayer.org/js/tools/1.1.2/all/jquery.tools.min.js?v=1"></script>	


<script type="text/javascript">
$("#scroller").scrollable().autoscroll({autoplay: false});
</script>